import numpy as np
import torch
import random
import math
import torch.nn.functional as F
import matplotlib.pyplot as plt
import re
import torch.nn as nn

# view可以点进去
input = torch.arange(1, 5, dtype=torch.float32).view(1, 1, 2, 2)
print(input)
print("*"*100)
# 可以点进去 size 和 scale_factor只能二选其一，有案例
m = nn.Upsample(None, scale_factor=2, mode='nearest')
print(m(input))
